import java.util.*;
import java.io.*;

public class Lab14Task04 {
	public static void main(String[] args) throws IOException, FileNotFoundException {
		int[] ID = new int[5];
		double[][] quizGrades = new double[5][5];
		Scanner sc = new Scanner(new FileInputStream("grade.txt"));
		for (int row = 0; row < 5; row++) {
			ID[row] = sc.nextInt();
			for (int column = 0; column < 5; column++) {
				quizGrades[row][column] = sc.nextDouble();
			}
		}
		double[] avg = studentAverages(quizGrades);
		System.out.println("#ID\tQuiz Average");
		for (int i = 0; i < 5; i++) {
			System.out.printf("%d\t%12.1f\n", ID[i], avg[i]);
		}
		sc.close();
	}

	private static double[] studentAverages(double[][] quizGrades) {
		double sum;
		double[] avg = new double[5];
		for (int row = 0; row < 5; row++) {
			sum = 0;
			for (int column = 0; column < 5; column++) {
				sum = sum + quizGrades[row][column];
			}
			avg[row] = sum / 5.0;
		}
		return avg;
	}
}